import request from '@/utils/request'

export function getAllAppraisal(query) {
    return request({
      url: '/kpExamScoringDb/list',
      method: 'get',
      params: query
    })
}

export function getAppraisal(query) {
  return request({
    url: '/kpExamScoringDb/listIndexByKesdId',
    method: 'get',
    params: query
  })
}

//新增页面
//查询未提交的数据
export function getLatestUnsaveIndex() {
  return request({
    url: '/kpExamScoringDb/new/getLatestUnsaveIndex',
    method: 'get',
    params:{}
  })
}

//应用指标 - 行
export function applyIndex(data) {
  return request({
    url: '/kpExamScoringDb/new/applyIndex',
    method: 'post',
    data:data
  })
}
//删除指标 - 行
export function isDeleteIndexById(query) {
  return request({
    url: '/kpExamScoringDb/new/deleteIndexById',
    method: 'get',
    params:query
  })
}
//删除考评库
export function deleteKpk(query) {
  return request({
    url: '/kpExamScoringDb/new/deleteKpk',
    method: 'get',
    params:query
  })
}
// 考评库提交
export function isCommit(query) {
  return request({
    url: '/kpExamScoringDb/new/commit',
    method: 'get',
    params:query
  })
}

//管理页面
//应用 修改
export function applyIndexList(data) {
  return request({
    url: '/kpExamScoringDb/applyIndex',
    method: 'post',
    data:data
  })
}
//删除指标
export function deleteIndexByIdList(query) {
  return request({
    url: '/kpExamScoringDb/deleteIndexById',
    method: 'get',
    params:query
  })
}
//删除考评库
export function deleteKpkList(query) {
  return request({
    url: '/kpExamScoringDb/deleteKpk',
    method: 'get',
    params:query
  })
}
// 查询平台更新数据分类
export function getPtgxType(query) {
  return request({
    url: '/kpExamScoringDb/getPtgxType',
    method: 'get',
    params:query
  })
}
// 修改指标的平台更新类型（新建页面）
export function updatePtgxTypeNew(data) {
  return request({
    url: '/kpExamScoringDb/new/updatePtgxType',
    method: 'post',
    data:data
  })
}
// 修改指标的平台更新类型
export function updatePtgxType(data) {
  return request({
    url: '/kpExamScoringDb/updatePtgxType',
    method: 'post',
    data:data
  })
}




